package com.xl.singleinstance;

/**
 * @ClassDescription:
 * @JdkVersion: 1.8
 * @Author: lei·xie
 * @Created: 2024/3/15 0015 16:43
 */
public class B {

    private static  B b;

    private B() {
    }

    public static B getInstance() {
        //拿对象时才开始创建对象
        if (b == null) {
            b = new B();
        }
        return b;
    }
}
